package fl.ass.service.service.impl;

import java.util.ArrayList;
import java.util.List;

import fl.ass.facade.condition.AssTrailCarChannelQC;
import fl.ass.facade.dto.AssTrailCarChannelDTO;
import fl.ass.service.dao.AssTrailCarChannelMapper;
import fl.ass.service.po.AssTrailCarChannel;
import fl.ass.service.service.IAssTrailCarChannelService;
import fl.ass.service.transform.AssTrailCarChannelTransform;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import cmm.service.core.framework.biz.BaseBizImpl;
import cmm.service.core.framework.dao.IBaseDao;
import cn.cmm.base.framework.exception.BaseException;


/**
 * @Description: 拖车渠道表 服务层接口实现
 * @Description: 类中已经实现了简单增删改查操作,可以直接使用,如果有需要重写该方法即可：
 * @Description: 1、add(TVO entity) 2、removeById(Long id) 3、modify(DTO entity) 4、selectById(Long id)	5、searchListPage(Pager page) 7、searchList(DTO dto)   
 * @Description: 业务层方法名称前缀：新增：add* 删除：remove* 修改：modify* 查询对象：select* get* 批量：batch* 查询集合：search*
 */
@Service
public class AssTrailCarChannelServiceImpl extends BaseBizImpl<AssTrailCarChannel, AssTrailCarChannelDTO, AssTrailCarChannelQC> implements IAssTrailCarChannelService {
	
	@SuppressWarnings("unused")
	private static final Logger logger = LoggerFactory.getLogger(IAssTrailCarChannelService.class);
	
	@Autowired
	private AssTrailCarChannelMapper assTrailCarChannelMapper;
	
	@Override
	public List<AssTrailCarChannelDTO> searchList(AssTrailCarChannelQC condition) throws BaseException {
		if(null == condition) return new ArrayList<AssTrailCarChannelDTO>();
		List<AssTrailCarChannel> list = this.assTrailCarChannelMapper.selectList(condition);
		return AssTrailCarChannelTransform.toDTOList(list);
	}
	
	@Override
	public IBaseDao<AssTrailCarChannel,AssTrailCarChannelQC> getDao() {
		return this.assTrailCarChannelMapper;
	}

    @Override
    public boolean enAbleChannel(Long id, Integer isValidInt) throws BaseException {
        return this.assTrailCarChannelMapper.enAbleChannel(id, isValidInt);
    }
}

